<?php
/**
 * Created by PhpStorm.
 * User: win7
 * Date: 2018/5/16 0016
 * Time: 10:48
 */

namespace Wx\Model;
use Think\Model;

class CreateReceiveModel extends Model
{
    protected $autoCheckFields =false;//设置为虚拟模型

    public function receive($sn){
        $qrcode_url = "http://www.xiangtws.com/Wx/Receive/index/sn/".$sn;//二维码中的链接
        $sn .= '.png';
        $qrcode_path_new = './Public/Receive/'.$sn;//生成不带logo的二维码的地址
        $content = $qrcode_url;//添加的二维码跳转链接
        $matrixPointSize = 1000;//二维码尺寸大小
        $matrixMarginSize = 2;//二维码边距
        $errorCorrectionLevel = "M";//容错级别,有被覆盖的区域还能识别，分别是L（QR_ECLEVEL_L，7%），M（QR_ECLEVEL_M，15%），Q（QR_ECLEVEL_Q，25%），H（QR_ECLEVEL_H，30%）；
//        $qrcode_path = "http://www.xiangtws.com/Public/Qrcode/logo/" . $logo_name;//logo所在位置
//        $qrcode_path='http://pt.xiangtws.com/Public/Qrcode/logo/log.jpeg';
//        $url = './Public/Qrcode/' .$sn;//生成带logo的二维码的地址
        load('Common.Qrcode');
        makecode_no_pic($content, $qrcode_path_new, $matrixPointSize, $matrixMarginSize, $errorCorrectionLevel);//生成不带logo的方法
//        makecode($qrcode_path, $content, $matrixPointSize, $matrixMarginSize, $errorCorrectionLevel, $url);//生成带logo的方法
        return $sn;
    }//end fun receive
}//end class